﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ross.EntityFramework.Model
{
    [Table("Course")]
    public class Course : IEntity<long>
    {
        public long ID { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [Required]
        [StringLength(50)]
        public string Title { get; set; }
        /// <summary>
        /// 副标题
        /// </summary>
        [Required]
        [StringLength(500)]
        public string Intro { get; set; }
        /// <summary>
        /// 评分
        /// </summary>
        public int Rate { get; set; }
        public decimal Points { get; set; }
        /// <summary>
        /// 课程时长，分钟为单位
        /// </summary>
        public decimal Times { get; set; }
        /// <summary>
        /// 课程分类ID
        /// </summary>
        public string ClassID { get; set; }
        /// <summary>
        /// 课程类型
        /// </summary>
        [StringLength(8)]
        public string CType { get; set; }
        /// <summary>
        /// 视频地址
        /// </summary>
        [StringLength(500)]
        public string VedioURL { get; set; }
        /// <summary>
        /// 图片地址
        /// </summary>
        [StringLength(500)]
        public string ImgURL { get; set; }
        /// <summary>
        /// 课件地址
        /// </summary>
        [StringLength(500)]
        public string FileURL { get; set; }
        /// <summary>
        /// 无效
        /// </summary>
        [Required]
        public bool InActive { get; set; }
        /// <summary>
        /// 课程内容
        /// </summary>
        public string Contents { get; set; }
        /// <summary>
        /// 讲师ID
        /// </summary>
        public int UserID { get; set; }
        /// <summary>
        /// 讲师名称
        /// </summary>
        [StringLength(20)]
        [Required]
        public string UserName { get; set; }
        /// <summary>
        /// 报名人数
        /// </summary>
        public int SignNum { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get; set; } = DateTime.Now.AddDays(30);
    }
}
